
public class mainclass 
{
	public static void main(String a[])
	{
		DongVatBietBay bietbayObject = new DongVatBietBay();
		bietbayObject.TiengKeu();
		bietbayObject.BietBay();
		bietbayObject.BayLuonlo();
	}
}
class DongVat{
	public void TiengKeu()
	{
		System.out.println("Day la tieng keu cua toi");
	}
	private void DacDiemRieng()
	{
		System.out.println("Day la dac diem rieng cua toi");
	}
	protected void Hello()
	{
		System.out.println("Hello");
	}
}
class DongVatBietBay extends DongVat{
	public void BietBay()
	{
		System.out.println("Toi co the bay tren troi");
	}
	protected void BayLuonlo()
	{
		System.out.println("Toi co the bay luon lo tren mat nuoc");
	}
}
class DongVatBietBoi extends DongVat{
	public void BietBoi()
	{
		System.out.println("Toi co the boi duoi nuoc");
		
	}
}
class Chim{
	DongVatBietBay bietbayObject = new DongVatBietBay();
	DongVat dongvatObject = new DongVat();
	public void BayTrenTroi()
	{
		bietbayObject.BayLuonlo();
		dongvatObject.Hello();
	}
}
